package ooExercise.day04;

public class AnimalTest {
    public static void main(String[] args) {
        Animal[] animals=new Animal[3];
        animals[0]=new Pig("阿芬",2,"黑","米糠");
        animals[1]=new Pig("小七",4,"黄","鱼");
        animals[2]=new Pig("吞吞",3,"白","骨头");
        Master master=new Master();
        for(int i=0;i<animals.length;i++){
            System.out.println(animals[i].name);
            master.feed(animals[i]);
        }
    }
}
